package com.sxf.redis.properties;

import java.util.List;

/**
 * @description: 主从模式
 * @author: zhangyb@ccccit.com.cn
 * @date: 2021年1月4日 上午9:21:23
 */
public class MasterSlaveProperties extends RedissonBaseProperties {
	private int failedAttempts = 3;
	private int slaveSubscriptionConnectionMinimumIdleSize = 1;
	private int slaveSubscriptionConnectionPoolSize = 50;
	private int slaveConnectionMinimumIdleSize = 32;
	private int slaveConnectionPoolSize = 64;
	private int masterConnectionMinimumIdleSize = 32;
	private int masterConnectionPoolSize = 64;
	private String readMode = "SLAVE";
	private List<String> slaveAddresses;
	private String masterAddress;
	private int database = 0;

	public int getFailedAttempts() {
		return failedAttempts;
	}

	public void setFailedAttempts(int failedAttempts) {
		this.failedAttempts = failedAttempts;
	}

	public int getSlaveSubscriptionConnectionMinimumIdleSize() {
		return slaveSubscriptionConnectionMinimumIdleSize;
	}

	public void setSlaveSubscriptionConnectionMinimumIdleSize(int slaveSubscriptionConnectionMinimumIdleSize) {
		this.slaveSubscriptionConnectionMinimumIdleSize = slaveSubscriptionConnectionMinimumIdleSize;
	}

	public int getSlaveSubscriptionConnectionPoolSize() {
		return slaveSubscriptionConnectionPoolSize;
	}

	public void setSlaveSubscriptionConnectionPoolSize(int slaveSubscriptionConnectionPoolSize) {
		this.slaveSubscriptionConnectionPoolSize = slaveSubscriptionConnectionPoolSize;
	}

	public int getSlaveConnectionMinimumIdleSize() {
		return slaveConnectionMinimumIdleSize;
	}

	public void setSlaveConnectionMinimumIdleSize(int slaveConnectionMinimumIdleSize) {
		this.slaveConnectionMinimumIdleSize = slaveConnectionMinimumIdleSize;
	}

	public int getSlaveConnectionPoolSize() {
		return slaveConnectionPoolSize;
	}

	public void setSlaveConnectionPoolSize(int slaveConnectionPoolSize) {
		this.slaveConnectionPoolSize = slaveConnectionPoolSize;
	}

	public int getMasterConnectionMinimumIdleSize() {
		return masterConnectionMinimumIdleSize;
	}

	public void setMasterConnectionMinimumIdleSize(int masterConnectionMinimumIdleSize) {
		this.masterConnectionMinimumIdleSize = masterConnectionMinimumIdleSize;
	}

	public int getMasterConnectionPoolSize() {
		return masterConnectionPoolSize;
	}

	public void setMasterConnectionPoolSize(int masterConnectionPoolSize) {
		this.masterConnectionPoolSize = masterConnectionPoolSize;
	}

	public String getReadMode() {
		return readMode;
	}

	public void setReadMode(String readMode) {
		this.readMode = readMode;
	}

	public List<String> getSlaveAddresses() {
		return slaveAddresses;
	}

	public void setSlaveAddresses(List<String> slaveAddresses) {
		this.slaveAddresses = slaveAddresses;
	}

	public String getMasterAddress() {
		return masterAddress;
	}

	public void setMasterAddress(String masterAddress) {
		this.masterAddress = masterAddress;
	}

	public int getDatabase() {
		return database;
	}

	public void setDatabase(int database) {
		this.database = database;
	}

}
